feat(G4): verb_table tense modulation (Quirk CGEL grounded)#306
Conversation
Seed TEKAMOLO slot priors for the 10 VerbFamily variants that were using uniform defaults (Supports, Contradicts, Refines, Grounds, Abstracts, Enables, Prevents, Transforms, Mirrors, Dissolves). Priors applied across all 12 Tense variants per family (144 cells). Semantic profiles per grammar-landscape.md S3: - Action verbs (Causes, Prevents, Transforms): high Kausal + Temporal - State verbs (Supports, Contradicts, Refines, Grounds): high Modal - Change verbs (Becomes, Abstracts, Mirrors, Dissolves): high Temporal + Modal - Discovery verbs (Enables): high Kausal + Lokal Also adds Tense::ALL const array and 13 new tests (one per family plus a sweep test). Total verb_table tests: 16. Contract suite: 319. Starter values -- tune empirically with corpus statistics. https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
…se priors now vary
Closes the G4 loose end where default_table() broadcast 12 family priors
across all 12 tenses, producing a degenerate 144-cell table with only 12
unique values and zero tense x family interaction.
Adds:
- SlotPriorDelta { temporal, kausal, modal, lokal, instrument }
- SlotPrior::combine(self, delta) -> SlotPrior (sum + clamp to [0,1])
- tense_modifier(tense: Tense) -> SlotPriorDelta with linguistically
grounded modulation per Quirk et al. *Comprehensive Grammar of the
English Language* sections 4.21-4.27 (tense / aspect / mood)
- base_prior(family) factored out from default_table()
Modulation rules (after reading the actual Tense enum from role_keys.rs;
the enum has Potential, no Subjunctive — Potential fills that role):
Perfect | Pluperfect | FuturePerfect : temporal +0.15
PresentContinuous | PastContinuous | FutureContinuous : temporal +0.10, modal -0.05
Imperative : temporal -0.20, modal +0.20
Potential : temporal -0.10, kausal -0.05, modal +0.25
Habitual : temporal -0.10, modal +0.05
Present | Past | Future : no modifier
default_table() now iterates (family, tense) and applies
final = base_prior(family).combine(tense_modifier(tense)).
Failing-test-first: test_perfect_amplifies_temporal_within_family was
written and confirmed to fail on the broadcast-flat code (Causes/Perfect
== Causes/Past == 0.4); after the fix it passes (0.55 > 0.4).
Also adds:
- test_imperative_suppresses_temporal (Causes: 0.2 < 0.4 temporal, modal up)
- test_subjunctive_amplifies_modal (Supports/Potential modal > Present)
- test_continuous_amplifies_temporal_less_than_perfect (ordering sanity)
- test_combine_clamps_to_unit_interval (clamping)
Two pre-existing tests that sampled non-default tenses (Refines/Perfect,
Dissolves/Imperative) had encoded the broadcast-flat assumption; switched
their tense to Present (unmarked, no modifier) so they keep asserting the
family-level base prior. The tense-specific behaviour they previously
shadowed is now covered by the new modulation tests.
cargo test -p lance-graph-contract verb_table --lib: 21 passed (was 16).
cargo test -p lance-graph-contract --lib: 324 passed, 0 failed.
- Fix 4× `#[deprecated(since = "next")]` invalid semver in context_chain.rs — drop `since` field (G3 refactor artifact) - Fix `actor.role <= u8::MAX` tautological comparison in lance_membrane.rs:768 — replace with meaningful `< 32` guard - Document Wave-1 LOC audit in EPIPHANIES.md: recovery (#275-#283) = +8,728; Wave 1 (#300-#306) = +3,156; combined = +11,807; zero LOC lost from G1 rebase cargo fmt --check: clean cargo clippy (4 crates): warnings only, 0 errors https://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
Brutally Honest Review — PRs #300-#306 + clippy fix674 tests pass across the four touched crates (328 contract + 89 deepnsm + 75 callcenter + 182 planner). All The verdict first
This batch is the strongest work from the other session. Every PR does what it claims, tests verify behavior not just compilation, and the architecture matches CLAUDE.md doctrine (methods on carriers, not free functions). What's genuinely good
What needs attentionTech debt: FNV-1a duplicated 8+ timesThe FNV-1a 64-bit hash appears in:
All produce identical results. This is a clear candidate for #300 Pipeline DAG has no consumer
#301 Hash UDF is a hard-fail placeholder
#302 LanceAuditSink
|
Summary
tense_modifier(Tense) -> SlotPriorDeltabreaks the broadcast-flatness — within-family priors now vary by tense/aspect/mood. Linguistically grounded in Quirk et al. CGEL §4.21–4.27, cited in module doc.Tense::ALLconst array added torole_keys.rsReview notes
Test plan
test_perfect_amplifies_temporal_within_family— Causes/Perfect.temporal > Causes/Past.temporal (failing-first proven: both were 0.4 before)test_imperative_suppresses_temporal— Imperative.temporal < Present.temporaltest_subjunctive_amplifies_modal— Potential.modal > Present.modaltest_continuous_amplifies_temporal_less_than_perfecttest_combine_clamps_to_unit_intervalhttps://claude.ai/code/session_01NYGrxVopyszZYgLBxe4hgj
Generated by Claude Code